package com.code2roc.jarmanage.db;

import com.code2roc.jarmanage.model.ConfigDO;
import com.code2roc.jarmanage.util.DataBaseUtil;

import java.util.List;

public class ConfigDB {
    public static void insert(ConfigDO entity) {
        DataBaseUtil.insert("DepolyConfig", entity);
    }

    public static void delete(String configID) {
        DataBaseUtil.executeSQL("delete from DepolyConfig where configID='" + configID + "'");
    }

    public static void update(ConfigDO entity) {
        DataBaseUtil.update("DepolyConfig", entity, "configID");
    }

    public static ConfigDO selectOne(String configID) {
        return DataBaseUtil.selectOne(ConfigDO.class, "DepolyConfig", "configID", configID);
    }

    public static List<ConfigDO> selectList(String where) {
        return DataBaseUtil.selectList(ConfigDO.class, "DepolyConfig", where);
    }
}
